<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Culture="Auto" Debug="true" %>
<%@ Register assembly="Microsoft.Web.Preview" namespace="Microsoft.Web.Preview.UI" tagprefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Search Page</title>
</head>
<body "padding: 0px; margin: 0px;>
    <form id="form1" runat="server" 
    style="padding: 0px; margin: 0px; position: inherit">
    
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" 
            AsyncPostBackErrorMessage="Sorry we made a error somewhere, we are sure however that you have not lost data" 
            AsyncPostBackTimeout="10">
        </asp:ScriptManager>
        <asp:ObjectDataSource ID="SearchResults" runat="server" SelectMethod="Search" TypeName="CombinedSearch" EnableViewState="False" OldValuesParameterFormatString="original_{0}">
            <SelectParameters>
                <asp:ControlParameter ControlID="Search" DefaultValue="xxxxxxxxxxxxxx xxxxxxxxxx" Name="searchParameter"
                    PropertyName="Text" Type="String" ConvertEmptyStringToNull="False" />
            </SelectParameters>
        </asp:ObjectDataSource>
        <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel"
            DisplayAfter="10">
            <ProgressTemplate>
                <img src="images/ajax-loader.gif" alt="BusyImage"/>
             </ProgressTemplate>
        </asp:UpdateProgress>
    </div>
        <asp:UpdatePanel ID="UpdatePanel" runat="server" EnableViewState="False">
            <ContentTemplate>
                <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
                    <tr>
                        <td colspan="1" style="width:80px">
                            <asp:TextBox ID="Search" runat="server" Width="186px"></asp:TextBox></td>
                        <td style="width: 69px" >
                            <asp:Button ID="Button1" runat="server" Text="Search" /></td>
                    </tr>
                    <tr>
                        <td colspan="2">
                        <asp:GridView ID="GridView1" runat="server" CellPadding="4" DataSourceID="SearchResults"
                                ForeColor="#333333" GridLines="None" AutoGenerateSelectButton="True" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"  Font-Names="Verdana" Font-Size="X-Small" OnRowDataBound="GridView1_RowDataBound" EnableViewState="False" Width="100%" AllowSorting="True">
                                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                <RowStyle BackColor="#EFF3FB" />
                                <EditRowStyle BackColor="#2461BF" />
                                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                <AlternatingRowStyle BackColor="White" />
                            </asp:GridView>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="Search" EventName="TextChanged" />
                <asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
                
                <asp:PostBackTrigger ControlID="GridView1" />
                
            </Triggers>
        </asp:UpdatePanel>
</form>
    
</body>
</html>
